<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>

<style>
.imgparent div {
  width: 100px;
  height: 100px;
  background-image: url('resources/cake.png');
}
</style>
<div id="outer">
  <div id="img"></div>
</div>

<script>
async_test(function(t) {
    var outer = document.getElementById("outer");
    var img = document.getElementById("img");
    var axImg = accessibilityController.accessibleElementById("img");
    axImg.addNotificationListener((notification) => {
        if (notification == "MarkDirty")
            t.done();
    });
    outer.className = "imgparent";
}, "A notification is received when a background image loads.");
</script>
